/* ****************************************************************************
 *
 * Copyright (c) Microsoft Corporation. 
 *
 * This source code is subject to terms and conditions of the Microsoft Public License. A 
 * copy of the license can be found in the License.html file at the root of this distribution. If 
 * you cannot locate the  Microsoft Public License, please send an email to 
 * dlr@microsoft.com. By using this source code in any fashion, you are agreeing to be bound 
 * by the terms of the Microsoft Public License.
 *
 * You must not remove this notice, or any other, from this software.
 *
 * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
 * KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
 * PARTICULAR PURPOSE.
 * ***************************************************************************/


#if !defined(AFX_GDIPHELPERREGION_H__58B85104_595F_4E3F_A5BC_DCC473591B04__INCLUDED_)
#define AFX_GDIPHELPERREGION_H__58B85104_595F_4E3F_A5BC_DCC473591B04__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <pgl/igfx/GDIpHelper.h>
#include <pgl/core/PGLRegion.h>

namespace pgl
{

/*! \brief GDI+ helper for drawing CPGLRegion 

	\ingroup GDIpGroup
*/
class PGLCORE_EXT_CLASS CGDIpHelperRegion : public gfxinterface::CGDIpHelper
{
public:
	CGDIpHelperRegion(gfxinterface::CGDIpInterface* pGfx = NULL, CPGLRegionPtr pRegion = CPGLRegionPtr() )
		: CGDIpHelper(pGfx), m_pRegion(pRegion),m_bPostRefresh(false){};

	void SetRegion(CPGLRegionPtr pRegion)	{	m_pRegion = pRegion;};	
	void PostRefresh()						{	m_bPostRefresh=true;};

protected:
	virtual void DrawOffScreen(gfxinterface::ELayer eLayer);
	CPGLRegionPtr m_pRegion;
	bool m_bPostRefresh;
};

};

#endif // !defined(AFX_GDIPHELPERREGION_H__58B85104_595F_4E3F_A5BC_DCC473591B04__INCLUDED_)
